using System.ComponentModel.DataAnnotations;
using System.Security;

namespace OOP.IOC
{
    interface ISort
    {
        public void Sort();
    }

    class Bubble:ISort
    {
       public void Sort()
        {
            
        }
    }

    class Quick:ISort
    {
        public void Sort()
          {
            
        }
    }

    class List
    {
        public void Sort()
        {
            var sorter = new Bubble();
            sorter.Sort();
        }

        public void Sort(ISort sorter)
        {
            sorter.Sort();
        }

        public static void Test()
        {
            var sorter = new Quick();
            var lst = new List();
            lst.Sort(sorter);

        }
    }
}